import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import styleImport from "vite-plugin-style-import"
import path from 'path'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue(),
    styleImport({
      libs:[
        {
          libraryName: "vant",
          esModule:false,
          resolveStyle: (name) =>  {return `vant/es/${name}/style/index`},
        },
      ],
    })
  ],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "src"),
      "components": path.resolve(__dirname, "src/components"),
      "store": path.resolve(__dirname, "src/store"),
      "utils": path.resolve(__dirname, "src/utils"),
      "service": path.resolve(__dirname, "src/service")
    },
  }
})
